/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package poker;

import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;

/**
 *
 * @author pol
 */
public class AreaDibujoEspera extends AreaDibujo {
    private String jug;
    private Ventana ven;

    public AreaDibujoEspera(String jug, Ventana ven) {
        this.jug = jug;
        this.ven = ven;
        repaint();
    }

    @Override
    public void clickRecibido(int x, int y) {
        if (x >= 180 && x <= 180 + 250 && y >= 430 && y <= 430 + 30)
            ven.finalizarEspera();
        repaint();
    }

    @Override
    public void paint(Graphics g) {
        pintaFondo(g);
        g.setColor(new Color(255, 255, 0));
        g.setFont(new Font(null, Font.BOLD, 30));
        g.drawString("Esperando a " + jug + "...", 70, 350);
        g.setColor(new Color(0, 64, 0));
        g.fillRect(180, 430, 250, 30);
        g.setColor(new Color(255, 255, 0));
        g.setFont(new Font(null, Font.BOLD, 15));
        g.drawString("YA ESTOY AQUI", 250, 450);
    }
}
